package com.talos.ums.controller.admin.organization.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Schema(description = "管理后台 - 组织表新增/修改 Request VO")
@Data
public class UmsOrganizationSaveReqVO {

    @Schema(description = "自增id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22091")
    private Long id;

    @Schema(description = "组织编码")
    private String code;

    @Schema(description = "组织名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "组织名称不能为空")
    private String name;

    @Schema(description = "父级组织id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18935")
    @NotNull(message = "父级组织id不能为空")
    private Long parentId;

    @Schema(description = "父级组织编码")
    private String parentCode;

    @Schema(description = "组织层级")
    private Integer level;

    @Schema(description = "同组内的组织顺序，从1开始累加，一级组织为0")
    private Integer sort;

    @Schema(description = "状态（0:停用 1:启用）", example = "1")
    private Integer status;

    @Schema(description = "是否结算组织，默认为是")
    private Integer isSettlementOrg;

    @Schema(description = "机构编码集合，（新增的自定义字段）")
    private String organizationCodeTree;

    @Schema(description = "机构id集合，（新增的自定义字段）")
    private String organizationIdTree;

    @Schema(description = "组织类型编码（COMPANY：公司；DEPARTMENT：部门）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "组织类型编码（COMPANY：公司；DEPARTMENT：部门）不能为空")
    private String organizationTypeCode;

    @Schema(description = "租户编码")
    private String tenantCode;

}
